<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js" type="text/javascript"></script>
</head>
<body>
    <h1>抢购产品测试</h1>
</body>
<script type="text/javascript">
    for (let i = 1; i <= 30000; i++){
        let params = {
            userId: 1,
            productId: 1,
            quantity: 3
        };
        //
        $.post("./purchase", params, function (result) {
            alert(result.message);
        })
    }
</script>
</html>